package com.javasm.finance.dao;

import com.javasm.finance.entity.Product;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

public interface ProdDao {
    List<Product> findQueryAll(Integer page, Integer pageSize, String prodName) throws SQLException;

    long findTotalNum(String prodName) throws SQLException;

    Product findByProdId(Integer prodId) throws SQLException;

    int edit(Product product) throws SQLException;

    Product finQueryProdParent(String prodName) throws SQLException;

    int addProd(Product product) throws SQLException;

    List<Product> findQueryProd() throws SQLException;
    //删除
    int delete(Integer prodId, Connection conn) throws SQLException;
    //查询关联的产品
    List<Product> findQueryRelevance(Integer parentId,Integer prodId) throws SQLException;
    //添加关联的产品
    int addRelevance(String relevance,Integer prodId, Connection conn) throws SQLException;

    Product queryRelevanceId(Integer prodId) throws SQLException;
}
